// 加法函数
debugger
const add = (a,b) => a + b;
// 玩家类
class Player{
    constructor(name,age){
        debugger
        this.name = name;
        this.age = age;
    }
    play(){
        debugger
        console.log(`i am playing game!`)
    }
    getAge(){
        console.log(`my age:${this.age}`);
    }
    getName(){
        console.log(`my name:${this.name}`);
    }
}

const player1 = new Player('leon',21);
const player2 = new Player('brandon',33);

player1.play();
player1.getName();
player2.getAge();

console.log(`sum of player1 & 2 age:${add(10, 20)}`);